package com.lottery.dao.pc28.lobbyDao;

import com.lottery.entity.Bettinginfo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface BettinginfoDao {

	/**
	 * 查询bettinginfo投注详情表所有信息
	 * 
	 * @return
	 */
	List<Bettinginfo> selectBettinginfoList(String expect);

	/**
	 * 分页查询bettinginfo投注详情表所有信息
	 * 
	 * @param expect
	 * @param startCount
	 * @return
	 */
	List<Bettinginfo> selectBettinginfoPage(@Param(value = "expect") String expect,
                                            @Param("lotteyType") int lotteyType); // @Param(value = "startCount") int startCount,

	/**
	 * 根据userId查询bettinginfo投注详情表数据
	 *
	 * @return
	 */
	List<Bettinginfo> selectBettinginfoByUserId(int userId);

	/**
	 * 添加list到bettinginfo投注详情表
	 */
	void insertBettinginfoList(List<Bettinginfo> bettinginfoList);

	/**
	 * 修改中奖状态
	 */
	void updateBettinginfo(Bettinginfo bettinginfo);

	/**
	 * 根据userId和期号expect查询bettinginfo投注详情表数据
	 *
	 * @return
	 */
	List<Bettinginfo> selectBettinginfoByExpect(@Param(value = "userId") int userId,
                                                @Param(value = "expect") String expect, @Param("type") int type);

	/**
	 * 根据userId和期号expect统计投注总金额
	 */
	Double betTotalAmount(@Param(value = "userId") int userId, @Param(value = "expect") String expect);

	int selectUserBetCount(int userId);

	int selectUserbetWinCount(int userId);

	int selectUserbetAmount(int userId);
}
